import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
       /* BinaryTree tree = new BinaryTree();
        BinaryTree.BTNode root = tree.createBinaryTree();
        System.out.print("前序遍历：");
        tree.preOrder(root);
        System.out.print("中序遍历：");
        tree.inOrder(root);
        System.out.print("后序遍历：");
        tree.postOrder(root);
        System.out.println();
        System.out.println("节点的个数："+tree.size2(root));
        System.out.println("节点的个数：");
        tree.size(root);
        System.out.println(BinaryTree.nodeSize);

        System.out.println("叶子节点的个数：");
        tree.getLeafNodeCount(root);
        System.out.println(BinaryTree.leafNodeCount);
        System.out.println(tree.getLeafNodeCount2(root));
        System.out.println("第K层节点的个数：");
        System.out.println(tree.getLevelNodeCount(root,3));
        System.out.println("二叉树的高度：");
        System.out.println(tree.getHeight(root));
        System.out.println("找到值为val的节点：");
        System.out.println(tree.find(root, 6).val);*/
        BinaryTree tree = new BinaryTree();
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        BinaryTree.BTNode root = tree.createBinaryTree(str);
        tree.inOrder(root);
    }
}
